﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;

namespace Bussiness_Objects
{
    /// <summary>
    /// Thong tin table CT_PHIEUTRASACH
    /// -- CT_PHIEUTRASACH(SoPT,MaCuonSach,NgayMuon,SoNgayMuon,TienPhat)
    /// </summary>
    public class CTPhieuTraSach : BusinessObjects
    {
        public CTPhieuTraSach()
        {

        }

        public CTPhieuTraSach(int _soPT, int _maCuonSach, string _ngMuon, int _soNgayMuon, long _tienPhat)
        {
            SoPT = _soPT;
            MaCuonSach = _maCuonSach;
            NgayMuon = _ngMuon;
            SoNgayMuon = _soNgayMuon;
            TienPhat = _tienPhat;
        }

        public override void SetParameterInsert()
        {
            SetParameterDelete();
        }

        public override void SetParameterUpdate()
        {
            
        }

        public void SetParameterDelete()
        {
            parms = new object[2];
            SqlParameter _parm = new SqlParameter(parSoPT, SoPT);
            parms[0] = _parm;

            _parm = new SqlParameter(parMaCuonSach, MaCuonSach);
            parms[1] = _parm;
        }

        public void SetParameterSelectKey()
        {
            SetParameterDelete();
        }

        public int SoPT { get; set; }
        private const string parSoPT = "@SoPT";

        public int MaCuonSach { get; set; }
        private const string parMaCuonSach = "@MaCuonSach";

        public string NgayMuon { get; set; }
        private const string parNgayMuon = "@NgayMuon";

        public int SoNgayMuon { get; set; }
        private const string parSoNgayMuon = "@SoNgayMuon";

        public long TienPhat { get; set; }
        private const string parTienPhat = "@TienPhat";
    }
}
